Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replaced attendance object with transaction #64

Merged
merged 3 commits into from
Oct 13, 2023

Conversation

Krace33
Copy link
Collaborator

@Krace33 Krace33 commented Oct 13, 2023

resolves #60

@Krace33 Krace33 temporarily deployed to dockerhub October 13, 2023 11:39 — with GitHub Actions Inactive
@Krace33 Krace33 linked an issue Oct 13, 2023 that may be closed by this pull request
@@ -76,11 +77,11 @@ public ResponseEntity<List<Event>> getEventsByBranch(@PathVariable Branch branch

@GetMapping("/user/{userId}")
@PreAuthorize(Constants.HAS_ROLE_MEMBER_AND_ABOVE)
public ResponseEntity<List<Event>> getUserEventsByRole(@PathVariable Integer userId, @RequestParam("role") @Nullable String role) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldnt it be better to get emai from jwt instead of passing user id in url ? @harshjohar 🤔
Rest lgtm

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, actually better idea

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed userId from path

Comment on lines 81 to 82
if (eventRole == null){
return ResponseEntity.ok(eventService.getUserEventsByRole(userId, EventRole.PARTICIPANT));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to #51 if event role is not provided all events should be returned

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now returning all events

@Krace33 Krace33 temporarily deployed to dockerhub October 13, 2023 14:04 — with GitHub Actions Inactive
Copy link
Collaborator

@ken1000minus7 ken1000minus7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm

@ken1000minus7 ken1000minus7 merged commit 062fa5d into main Oct 13, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Transform Attendance to transaction
3 participants